<?php
namespace app\api\library;
/**
 * 通知lib
 */
class Show
{
    /**
     * Server成功通知
     * @param array $data
     * @param string $message
     * @return array
     */
    public static function success($data = [], $message = "OK", $status = 1){
        $results = [
            'status'    => $status,
            'msg'   => $message,
            'data'    => $data,
        ];

        return $results;
    }

    /**
     * Server失败通知
     * @param string $message
     * @param int $status
     * @param array $data
     * @return array
     */
    public static function error($message = "error",$status = 0, $data = []){
        $results = [
            'status'    => $status,
            'msg'   => $message,
            'data'    => $data,
        ];

        return $results;
    }
}